import request from '@/utils/request'

// 用户密码重置
export function updateUserPwd(data) {
  return request({
    url: '/business/reset-pwd',
    method: 'post',
    data: data
  })
}
export function updateCashPwd(data) {
  return request({
    url: '/business/change-cash-password',
    method: 'post',
    data: data
  })
}
export function certification(data) {
  return request({
    url: '/business/real',
    method: 'post',
    data: data
  })
}
// 查询用户个人信息
export function getUserProfile() {
  return request({
    url: '/system/user/profile',
    method: 'get'
  })
}

// 修改用户个人信息
export function updateUserProfile(data) {
  return request({
    url: '/system/user/profile',
    method: 'put',
    data: data
  })
}

// 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/business/editPhoto',
    method: 'post',
    data: data
  })
}
export function uploadNickname(data) {
  return request({
    url: '/business/edit-nickname',
    method: 'post',
    data: data
  })
}
export function getInfo() {
  return request({
    url: '/business/user-info',
    method: 'post'
  })
}
